[qemu] Default monitor/serial ports to /dev/null if -nographic.
authorchris@kneesaa.uk.xensource.com <chris@kneesaa.uk.xensource.com>
Thu, 17 Aug 2006 10:34:13 +0000 (11:34 +0100)
committerchris@kneesaa.uk.xensource.com <chris@kneesaa.uk.xensource.com>
Thu, 17 Aug 2006 10:34:13 +0000 (11:34 +0100)
qemu-dm runs daemonized and the default for -nographic is to redirect
the monitor and serial ports to stdio which causes qemu-dm to busy
read from stdin.  Change the default for -nographic to redirect the
monitor and serial ports to /dev/null.

Based on a patch from: Steven Smith <sos22-xen@srcf.ucam.org>
Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
tools/ioemu/vl.c

index 76c4c76fc623e3846f650211c8c400397aaae0b3..b3d7a82f5128c7b270877a1cef6948cae9b55418 100644 (file)
@@ -6036,10 +6036,11 @@ int main(int argc, char **argv)
                 }
                 break;
             case QEMU_OPTION_nographic:
-                pstrcpy(monitor_device, sizeof(monitor_device), "stdio");
+                if(!strcmp(monitor_device, "vc"))
+                    pstrcpy(monitor_device, sizeof(monitor_device), "null");
                 if(!strcmp(serial_devices[0], "vc"))
                     pstrcpy(serial_devices[0], sizeof(serial_devices[0]),
-                            "stdio");
+                            "null");
                 nographic = 1;
                 break;
             case QEMU_OPTION_kernel: